<img src="bullet7.png"

style="position:absolute;bottom:0px;"

id="bullet"
 />

<script>
var ww = document.body.clientWidth;
var wh = document.body.clientHeight;
bullet.style.left = ww/2-16;

document.onclick = function(e){
  var x = e.pageX;
  var y = e.pageY;
  var x1 = parseInt(bullet.style.left);
  var a = x-x1;
  var b = wh-y;
  console.log(b);
  var deg = Math.atan(a/b)*180/Math.PI;
  bullet.style.transform = "rotate("+deg+"deg)";
  var rate = a/b;
  var b1 = 0;
  setInterval(function(){
    b1 = b1 + 10;
    var a1 = b1*rate;
    a1 = a1 + x1;
    bullet.style.left = a1;
    bullet.style.bottom = b1;
  },50);
};
</script>